package com.artron.mediaartron.ui.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.view.ViewGroup;

import com.artron.baselib.utils.UIUtils;
import com.artron.mediaartron.R;
import com.artron.mediaartron.base.BaseFragmentPagerAdapter;
import com.artron.mediaartron.ui.fragment.center.MyOrderContentFragment;

/**
 * Class description here
 *
 * @author doing
 * @version 1.0.0
 * @since 2017-11-02.
 */

public class OrderFragmentPagerAdapter extends BaseFragmentPagerAdapter {

    private final String[] mTitleArray;

    public OrderFragmentPagerAdapter(FragmentManager fm) {
        super(fm);
        mTitleArray = UIUtils.getStringArray(R.array.MyOrderTitle);
    }

    @Override
    public Fragment getItem(int position) {
        return MyOrderContentFragment.newInstance(position);
    }


    @Override
    public int getCount() {
        return 4;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return mTitleArray[position];
    }

}
